@(path: String, types: String, db: String)(implicit session: Session)

<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("blast/css/bootstrap.css")">
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("blast/css/blast.css")">
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("font-awesome-4.7.0/css/font-awesome.min.css")">

<script src="@routes.Assets.versioned("blast/js/jquery-3.1.1.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/d3.v4.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/bootstrap.min.js")" type="text/javascript"></script>
<script src="@routes.Assets.versioned("blast/js/blast.js")" type="text/javascript"></script>


<div id="resultContent">

</div>

<script>

        $(function () {

            $.ajax({
                url: "/mollusk/tools/blastResult?path=@path" + "&types=@types",
                type: "post",
                success: function (data) {
                    $("#resultContent").html(data.html);
                    let host =  window.location.hostname;
                    if ("@types" === "blastnGenome") {
                        $.each(data.block, function (i, v) {
                            const id = "#synteny" + v.index;
                            const iframe = "#iframe" + v.index;
                            const data = v.data;
                            const relate = v.relate;
                            const index = v.index + "-";
                            DisplayBlock(id, data, relate, index);
                            const name = data.B.name.split("-")[0];
                            const gb = data.B.name.split("-")[1];
                            const start = data.B.min;
                            const end = data.B.max;
                            $(iframe).attr("src","http://" + host + ":8080/?data=MODB/" + gb +"/data&loc=" + gb +
                                    ":" + start + ".." + end + "&tracks=DNA,Annotation&tracklist=0&nav=1&overview=0");
                        })
                    } else {
                        $(".blastDraw").hide();
                    }

                    $(".others").hide();
                }
            })

        });


        function toMoreInfo(name) {
            let array = name.split("-");
            if("@types" == "blastnGenome"){
                window.open("/US/mollusk/genome/genomeInfoPageByGeneid?geneid=" + array[1]);
            }else {
                window.open("/US/mollusk/genome/geneInfoPageByGeneid?geneid=" + array[0]);
            }
        }


            function DownByName(name) {
                window.location.href = "/downloadBlastByName?name=" + name  + "&db=@types" ;
            }

            function DownByRange(name, obj) {
                window.location.href = "/downloadBlastByRange?name=" + name + "&range=" + $("." + obj).text() + "&db=@types";
            }


</script>